package cn.cheneyjoo.feigninterface;

import cn.cheneyjoo.feigninterface.feignconfig.FeignSupportConfig;
import cn.cheneyjoo.feigninterface.feignfallback.ProductsFallBack;
import cn.cheneyjoo.model.Products;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name = "cheneyjoo-service-product",fallback = ProductsFallBack.class,configuration = FeignSupportConfig.class)
public interface ProductsFeignInterface {
    @RequestMapping("/product/{id}")
    Products getOneProduct(@PathVariable int id);
}
